package com.gopay.common.domain.cbrmb;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;

import com.gopay.common.domain.BaseEntity;

/**
 * 跨境人民币 运单表
 * @CbRmbWaybill.java
 * @author lailingyu
 * @2016-12-7 上午11:28:15  www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "CB_RMB_WAYBILL")
public class CbRmbWaybill extends BaseEntity {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = -8886869263308956213L;

    /**
     * 记录流水号
     */
    @Id
    @SequenceGenerator(name="CbRmbWaybillSequence",sequenceName="CB_RMB_WAYBILL_SEQ")
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CbRmbWaybillSequence")
    @Column(name="SQ", unique=true, nullable=false)
    private Integer sq;

    /**
     * 国付宝订单号
     */
    @Column(name="GOPAY_ORDER_ID")
    private String gopayOrderId;

    /**
     * 商户订单号
     */
    @Column(name="MER_ORDER_ID")
    private String merOrderId;

    /**
     * 运单号
     */
    @Column(name="WAYBILL")
    private String waybill;

    /**
     * 承运方代码
     */
    @Column(name="CARRIER_CODE")
    private Integer carrierCode;

    /**
     * 承运方名称
     */
    @Column(name="CARRIER_NAME")
    private String carrierName;

    /**
     * 客户ID
     */
    @Column(name="CUST_ID")
    private String custId;

    /**
     * 创建时间
     */
    @Column(name="CREATED_TS")
    private Date createdTs;

    /**
     * 最后修改时间
     */
    @Column(name="LAST_UPD_TS")
    private Date lastUpdTs;

    /**
     * 删除标识：0为有效，1为删除
     */
    @Column(name="IS_DELETED")
    private String isDeleted;

    /**
     * 乐观锁版本号
     */
    @Version
    @Column(name="VERSION")
    private int version;

    public Integer getSq() {
        return sq;
    }

    public void setSq(Integer sq) {
        this.sq = sq;
    }

    public String getGopayOrderId() {
        return gopayOrderId;
    }

    public void setGopayOrderId(String gopayOrderId) {
        this.gopayOrderId = gopayOrderId;
    }

    public String getMerOrderId() {
        return merOrderId;
    }

    public void setMerOrderId(String merOrderId) {
        this.merOrderId = merOrderId;
    }

    public String getWaybill() {
        return waybill;
    }

    public void setWaybill(String waybill) {
        this.waybill = waybill;
    }

    public Integer getCarrierCode() {
        return carrierCode;
    }

    public void setCarrierCode(Integer carrierCode) {
        this.carrierCode = carrierCode;
    }

    public String getCarrierName() {
        return carrierName;
    }

    public void setCarrierName(String carrierName) {
        this.carrierName = carrierName;
    }
    
    public String getCustId() {
        return custId;
    }

    public void setCustId(String custId) {
        this.custId = custId;
    }

    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }
    
    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    public String getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(String isDeleted) {
        this.isDeleted = isDeleted;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

}
